package com.friday.po;

import java.io.Serializable;
import java.sql.Time;
import java.util.UUID;

public class Message implements Serializable {
	private String id;
	private String sender;
	private String receiver;
	private String content;
	private String title;
	private Time time;
	private int state;
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public void setId() {
		UUID uuid = UUID.randomUUID();
		this.id = uuid.toString();
	}
	public String getSender() {
		return sender;
	}
	public void setSender(String from) {
		this.sender = from;
	}
	public String getReceiver() {
		return receiver;
	}
	public void setReceiver(String to) {
		this.receiver = to;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public Time getTime() {
		return time;
	}
	public void setTime(Time time) {
		this.time = time;
	}
	public int getState() {
		return state;
	}
	public void setState(int state) {
		this.state = state;
	}
	
	public Message(String from, String to, String content, String title, Time time, int state)
	{
		super();
		this.content = content;
		this.sender = from;
		this.state = state;
		this.time = time;
		this.title = title;
		this.receiver = to;
		UUID uuid = UUID.randomUUID(); 
		this.id = uuid.toString();
	}
	
	public Message()
	{
		super();
	}
	public Message(String id, String from, String to, String content, String title, Time time, int state) {
		super();
		this.id = id;
		this.sender = from;
		this.receiver = to;
		this.content = content;
		this.title = title;
		this.time = time;
		this.state = state;
	}

}
